﻿/**
*    @file:    onlineusercontroller.cpp
*    @brief:
*    @author:  sanshi522@163.com
*    @date:    2025-03-22  11:44
*/
#include "onlineusercontroller.h"
#include <responesutils.h>

OnlineUserController::OnlineUserController(QObject *parent) : HttpController(parent)
{

}

OnlineUserController::~OnlineUserController()
{

}

void OnlineUserController::route(QString path, QString method, HttpRequest &request, HttpResponse &response)
{
    if (method == "GET")
    {
        if (path == "userlist")
        {
            return getUserList(request, response);
        }
    }
    return ResponesUtils::erroResponse(response,"not find");
}

void OnlineUserController::getUserList(HttpRequest &request, HttpResponse &response)
{
    return ResponesUtils::erroResponse(response,"未开发完成");
}
